<template>
  <div class="container-item-article" @click="routerLink(value)">
    <div class="group-right">
      <div class="item-title">{{ value.title }}</div>
      <div class="item-other">
        <span class="time">{{ value.release_at }}</span>
        <span class="hit">{{ value.pageviews }}</span>
      </div>
    </div>
    <van-image class="item-cover" fit="cover" :src="value.piccap" />
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: Object,
      default() {
        return {}
      }
    }
  },
  methods: {
    routerLink(params) {
      this.$router.push({ name: 'detailsArticle', params })
    }
  }
}
</script>

<style lang="less" scoped>
.container-item-article {
  display: flex;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid #ddd;
  .group-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .item-title{
      font-size: 20px;
  }
  .item-other {
    font-size: 12px;
    color: #aaa;
    span {
      margin-right: 20px;
    }
  }
  .item-cover{
      width: 149px;
      height: 108px;
  }
}
</style>
